const express = require('express');
const router = express.Router();
let Mock=require('mockjs');

// 1.首页接口
// 1）自然景观接口
router.get('/nature', (req, res) => {
  res.send({
    success: true,
    result: {
      title:"自然景观",
      img: [
        "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1492814301,2688463407&fm=26&gp=0.jpg",
        "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2493276083,502411089&fm=26&gp=0.jpg",
        "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3506602168,2749857935&fm=26&gp=0.jpg"
      ]
    },
    status: 200
  })
})
// 2）人文景观接口
router.get('/humanity', (req, res) => {
  res.send({
    success: true,
    result: {
      title:'人文景观',
      img: [
        "https://ss3.baidu.com/-fo3dSag_xI4khGko9WTAnF6hhy/baike/pic/item/0b7b02087bf40ad1e4906c9a572c11dfa9ecce57.jpg",
        "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fjiangsu.china.com.cn%2Fuploadfile%2F2017%2F0905%2F1504595535385451.jpg&refer=http%3A%2F%2Fjiangsu.china.com.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1612513785&t=bfb4955751c6c39fc7528a71026afe7b",
        "https://gimg2.baidu.com/image_search/src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20181010%2Fe92cd77f998340f6a5abccaee97287f9.jpeg&refer=http%3A%2F%2F5b0988e595225.cdn.sohucs.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1612513425&t=82eb0a9d5a87bb0a67c950b4d101ba3a"
      ]
    },
    status: 200
  })
})
// 3）田园风光接口
router.get('/country', (req, res) => {
  res.send({
    success: true,
    result: {
      title:'田园风光',
      img: [
        "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.mp.itc.cn%2Fupload%2F20170618%2F44348a3818bf45648a5946cba069432d_th.jpg&refer=http%3A%2F%2Fimg.mp.itc.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1612513785&t=65b576b5a04691cba76ce72089c88ec4",
        "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.juimg.com%2Ftuku%2Fyulantu%2F111231%2F6755-11123115410141-lp.jpg&refer=http%3A%2F%2Fimg.juimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1612513785&t=b67bd0e571ad111ca6f0d79450c72d66",
        "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1722337336,4274658512&fm=26&gp=0.jpg",
      ]
    },
    status: 200
  })
})


// 2.攻略接口
// 1）猜你喜欢接口
router.get('/youlike', (req, res) => {
  res.send({
    success: true,
    result:{
      title:'猜你喜欢',
      img:[
        "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3111049137,3116259153&fm=26&gp=0.jpg",
        "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2097904792,1539653580&fm=26&gp=0.jpg",
        "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1275774655,4144136426&fm=26&gp=0.jpg",
      ]
    },
    status: 200
  })
})
//2)热门攻略接口
router.get('/hot',(req,res)=>{
  res.send(Mock.mock({
    success:true,
    status:200,
    title:'热门攻略',
    result:[
      { 
        head:"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3311493379,3319145442&fm=26&gp=0.jpg",
        info:'@cword(240,260)',
        user:'@cword(2,4)',
        img:'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3508346648,3398993659&fm=26&gp=0.jpg'
      },
      { 
        head:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3421514359,2859620907&fm=26&gp=0.jpg",
        info:'@cword(240,260)',
        user:'@cword(2,4)',
        img:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=280655239,3198131885&fm=26&gp=0.jpg"
      },
      { 
        head:"https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3804870060,709162548&fm=26&gp=0.jpg",
        info:'@cword(240,260)',
        user:'@cword(2,4)',
        img:"https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3508346648,3398993659&fm=26&gp=0.jpg"
      },
      { 
        head:"https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2885499164,1973006998&fm=26&gp=0.jpg",
        info:'@cword(240,260)',
        user:'@cword(2,4)',
        img:"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=280655239,3198131885&fm=26&gp=0.jpg"
      },
      { 
        head:"https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3778695015,1593442367&fm=26&gp=0.jpg",
        info:'@cword(240,260)',
        user:'@cword(2,4)',
        img:'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3508346648,3398993659&fm=26&gp=0.jpg'
      }
    ]
  }))
})




module.exports = router